<!DOCTYPE html>
<!--[if IE 8]>			<html class="ie ie8"> <![endif]-->
<!--[if IE 9]>			<html class="ie ie9"> <![endif]-->
<!--[if gt IE 9]><!-->	<html> <!--<![endif]--><head>
	<meta charset="utf-8">
	<title>正式加盟 {$site_name} </title>
	<meta name="keywords" content="{$menu.menu_seo_key|default=$site_seo_keywords}" />
	<meta name="description" content="{$menu.menu_seo_des|default=$site_seo_description}">
	{include file="public:head" /}
    
<style>
	.pay_type a{
		float:left;
		display:inline-block;
		margin-right: 5px;
	}
	.pay_type a img{
		border: 1px solid #ddd;
		width: 120px;
		
		padding: 5px;
		background-color: #fff;
	
	}
	.pay_type a.curr{
		border:1px solid #ff0000		
	}
	.pay_type a.curr img{
		border:none;
	}
	</style>
</head>
<body class="body-white">
<div class="wrap">
	{include file="public:nav" /}
	<div id="main-cmf">
		<div class="breadcrumb-wrapper">
			<div class="container">
				<div class="row">
					<div class="col-lg-6 col-md-6 col-xs-12 col-sm-6">
						<h2 class="title">{:lang('personal center')}</h2>
					</div>
					<div class="col-lg-6 col-md-6 col-xs-12 col-sm-6">
						<div class="breadcrumbs pull-right">
							<ul>
								<li>{:lang('current location')}:</li>
								<li><a href="__ROOT__/">{:lang('home')}</a></li>
								<li><a href="{:url('home/Center/index')}">{:lang('personal center')}</a></li>
								<li>正式加盟</li>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
		<div class="content">
			<div class="container">
				<div class="row">
					<div class="col-lg-3 col-md-3 col-sm-3 col-xs-12">
						{include file="public:usernav"/}
					</div>
					<div class="col-lg-9 col-md-9 col-sm-9 col-xs-12">
						<div id="center-content" style="padding:20px">
							<div class="row">
                            <table class="table table-bordered table-striped table-hover">
									<thead>
									<tr>
										<th>开通会员</th>
									</tr>
									</thead>
									<tbody>
										<tr>
                                        	<td>
								<form class="form-light form-horizontal" id="runedit" action="{:url('home/Center/runjiameng')}" method="post" onSubmit="return checkform(this);">
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">会员名称</label>
										<label class="col-lg-5 col-md-5 col-sm-7 col-xs-9" style="padding-top:6px">
											{$member_list_username}
										</label>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">会员等级</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<select id="member_group_id" name="member_group_id" class="form-control" onChange="showmoney(this)">
												{foreach name="group" item="vo"}
													<option rel="{$vo["member_group_money"]}" value="{$vo["member_group_id"]}" {if condition="$key eq 0"}selected="selected"{/if}>{$vo["member_group_name"]}</option>
												{/foreach}
											</select>
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">升级费用</label>
										<label class="col-lg-5 col-md-5 col-sm-7 col-xs-9" style="padding-top:6px">
                                        <span  id="moneyarea">
                                        {empty name="group"}
                                        	0
                                        {else/}
											{$group[0]["member_group_money"]}
                                        {/empty} 
                                        </span>
                                        (当前余额：{$money})
										</label>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">支付方式</label>
										<div class="col-lg-7 col-md-7 col-sm-7 col-xs-9 pay_type">
											 <a id="a_wxpayqrcode" href="javascript:;" data='wxpayqrcode'><img  src="{$yf_theme_path}public/payment/images/wechatpay.png"/></a>
                                             {empty name="group"}
                                             	 <a id="a_alipay" href="javascript:;"  data='alipay' class="curr"><img  src="{$yf_theme_path}public/payment/images/alipay.png"/></a>
                                             	 <a id="a_money" href="javascript:;" data='money'><img  src="{$yf_theme_path}public/payment/images/yue.png"/></a>
                                             {else/}
                                                 {if condition="$money >= $group[0]['member_group_money']"}
                                                 	<a id="a_alipay" href="javascript:;"  data='alipay'><img  src="{$yf_theme_path}public/payment/images/alipay.png"/></a>	
                                                 	<a id="a_money" href="javascript:;" data='money' class="curr"><img src="{$yf_theme_path}public/payment/images/yue.png"/></a>
                                                 {else/}
                                                 	<a id="a_alipay" href="javascript:;" data='alipay' class="curr"><img src="{$yf_theme_path}public/payment/images/alipay.png"/></a>	
                                                 {/if}
                                             {/empty}
										</div>
							        </div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label">支付帐号(选填)</label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
											<input type="text" class="form-control" name="pay_account" value=""> 
										</div>
									</div>
									<div class="form-group">
										<label class="col-lg-3 col-md-3 col-sm-3 col-xs-2 control-label"></label>
										<div class="col-lg-5 col-md-5 col-sm-7 col-xs-9">
                                        	<input type="hidden" id="pay_type" name="pay_type" value="{empty name="group"}alipay{else/}{if condition="$money >= $group[0]['member_group_money']"}money{else/}alipay{/if}{/empty}">
											<button class="btn btn-primary" type="submit">{:lang('save')}</button>
										</div>
									</div>
								</form>
                                </td>
                                </tr>
                                </tbody>
                            </table>
							</div>
                            <div class="row">
                           
                                        {:config('options.bank_info')}
                                        
                                        
                                        
                                   
                            </div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	{include file="public:footer"/}
</div>
{include file="public:scripts"/}
<script type="text/javascript">
function showmoney(o){
	var m = $(o).find("option:selected").attr("rel"); 
	if(m>{$money}){
		$(".pay_type a").removeClass("curr");
		$("#a_alipay").addClass("curr");
		$("#a_money").hide();
		$("#pay_type").val("alipay");
	}else{
		$("#a_money").show();	
	}
	$("#moneyarea").html(m);
}

function checkform(o){
	if($("#member_group_id").val()==""){
		layer.alert("请选择要升级的等级！");	
		return false;
	}
	return true;
}

$(function(){
	$(".pay_type a").click(function(){
		$(".pay_type a").removeClass("curr");
		$(this).addClass("curr");
		$("#pay_type").val($(this).attr("data"));
	});		   
})
</script>
</body>
</html>